home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / amiga.compilers / comp.sys.amiga.programmer_7008_000027.msg < prev    next >
Encoding:
Text File  |  1994-11-27  |  2.5 KB  |  63 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: dd.chalmers.se!news.chalmers.se!sunic!EU.net!howland.reston.ans.net!gatech!concert!sas!mozart.unx.sas.com!jamie
  3. From: jamie@cdevil.unx.sas.com (James Cooper)
  4. Subject: Re: interrupt in SAS/C 6.51
  5. Originator: jamie@cdevil.unx.sas.com
  6. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  7. Message-ID: <CMAuIr.FH@unx.sas.com>
  8. Date: Mon, 7 Mar 1994 14:49:39 GMT
  9. References:  <1994Mar6.035403.28339@cdf.toronto.edu>
  10. Nntp-Posting-Host: cdevil.unx.sas.com
  11. Organization: SAS Institute Inc.
  12. Lines: 49
  13.  
  14.  
  15. In article <1994Mar6.035403.28339@cdf.toronto.edu>, a228grai@cdf.toronto.edu (Darrell Grainger) writes:
  16. >I just received my upgrade to SAS/C 6.50 and thought I'd try whipping up a
  17. >few programs. One of the programs I have created uses AddIntServer to add
  18. >a vertical blank interrupt. Here is the set up in the C code:
  19. >
  20. > [code deleted]
  21. >
  22. >Now if I create the function VertBServer using assembler I can get this to
  23. >work fine but what I would like to do (and this is just for experimental
  24. >purposes) is create the function VertBServer using C language. The code
  25. >for VertBServer is simply:
  26. >
  27. >       Signal(task, SIGBREAKF_CTRL_F);
  28. >
  29. >The variable task is a global variable initialized by the main code using:
  30. >
  31. >       task = FindTask(NULL);
  32. >
  33. >I've read some stuff about __interrupt in the SAS/C manual but it is not
  34. >entirely clear. I think I am probably not setting the Z flag when exiting
  35. >the VertBServer function. References to the manuals would actually be
  36. >appreciated.
  37.  
  38. Look up two SAS specific keywords (you'll need both of them).
  39.  
  40.         __interrupt     -       page 173, User's Guide Volume 1
  41.  
  42.                                 This will set your code up properly to
  43.                                 be an Interrupt function, and will take
  44.                                 care of the return code, flags, etc. on
  45.                                 exit from the routine.
  46.  
  47.         __saveds        -       pages 174-175, User's Guide Volume 1
  48.  
  49.                                 This will set up A4 properly on entry to
  50.                                 your function, so that you can access
  51.                                 global data for your code (such as your
  52.                                 'task' variable).
  53.  
  54. -- 
  55. ---------------
  56. Jim Cooper
  57. (jamie@unx.sas.com)                             bix: jcooper
  58.  
  59. Any opinions expressed herein are mine (Mine, all mine!  Ha, ha, ha!),
  60. and not necessarily those of my employer.
  61.  
  62. Remember, "Euphemisms are for the differently brained."
  63.